from rest_framework import serializers
from sign.models import CheckInTask, StudentCheckIn


class TaskSerializer(serializers.ModelSerializer):

    class Meta:
        model = CheckInTask
        fields = ('id', 'name', 'start_time', 'end_time', 'manager')


class TaskViewSerializer(TaskSerializer):
    manager = serializers.CharField()

    class Meta:
        model = CheckInTask
        fields = ('id', 'name', 'start_time', 'end_time', 'manager', 'publish_date')


class StudentCheckSerializer(serializers.ModelSerializer):

    class Meta:
        model = StudentCheckIn
        fields = '__all__'

